package emulator.hardware.io;

import emulator.hardware.HwByte;

public class AuxiliaryControlRegister {
	private HwByte value = new HwByte(0);
	
	public void setValue(int value){
		this.value.setNumber(value);
	}
	
	public int getValue() {
		return (int) value.getNumber();
	}
	
	public boolean getPortAMode() {
		return value.getBit(0);
	}

	public boolean getPortBMode() {
		return value.getBit(1);
	}
	
	public int getShiftMode() {
		return ((int)value.getNumber() >> 2) & 0x07;
	}
	
	public boolean getTimer2Mode() {
		return value.getBit(5);
	}
	
	public int getTimer1Mode() {
		return ((int) value.getNumber() >> 6) & 0x03;
	}
}
